<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <p>{{ num }}</p>
      <!-- 如果事件处理函数的逻辑比较简单，比如只有一行代码，就可以直接写在这里 -->
      <button v-on:click="num ++">点我+1</button>
      <button v-on:click="num --">点我-1</button>
    </div>

    <script src="../vue.js"></script>
    <script>
      var app = new Vue({
        el: '#app',
        data: {
          num: 0,
        },
      });
    </script>
  </body>
</html>
